package generics_and_collections.equals;

/**
 * Created with IntelliJ IDEA.
 * User: Sam
 * Date: 03/02/14
 * Time: 21:40
 * To change this template use File | Settings | File Templates.
 */

public class HasHash {

	public int x;

	HasHash(int xVal) {
		x = xVal;
	}

	public boolean equals(Object o) {
		if((o instanceof HasHash) && ((HasHash)o).x == this.x) {
			return true;
		}

		return false;
	}

	public int hashCode() {
		return x * 17;
	}
}
